/*
FSF_SacVentral
2013-2014

Auteur : ElDoktor, ToF, BeTeP

site : www.clan-fsf.fr
Debug : http://server.clan-fsf.fr:8008/redmine/projects/fsf-server-arma-26
Source : http://server.clan-fsf.fr:8008/redmine/projects/fsf-server-arma-26/repository

*/

if (isDedicated || !hasInterface) exitWith {};

player setVariable ["FSFSV_BACKPACK",objNull];
player setVariable ["FSFSV_BACKPACK_CARGO",[]];

#include "FSFSV_fnc_Core.sqf"

player addEventHandler ["Killed",{0 spawn FSFSV_Player_Killed;}];
player addEventHandler ["Respawn",{0 spawn FSFSV_Player_Init;}];

0 spawn FSFSV_Player_Init;

if (!isNil "TYR_MENU_IsActive" && {TYR_MENU_IsActive > 0}) then {
	if (!isnil "tyr_fnc_addHandler") then {
		["TYRMENU",
			[[
				localize "FSFSV_STR_MettreLeSacEnVentral"
				,FSFSV_TestPlayerBackpackBack
				,{0 spawn FSFSV_CallBackpackToFront;}
				,"tmf\support\modules\fsf_chestbag\backpackfront.paa"
			],
			[
				localize "FSFSV_STR_MettreLeSacSurLeDos"
				,FSFSV_TestPlayerBackpackFront
				,{0 spawn FSFSV_CallBackpackToBack;}
				,"tmf\support\modules\fsf_chestbag\backpackback.paa"
			]]
		] call tyr_fnc_addHandler;
	};
};